/*
 * @lc app=leetcode.cn id=412 lang=javascript
 *
 * [412] Fizz Buzz
 */

// @lc code=start
/**
 * @param {number} n
 * @return {string[]}
 */
var fizzBuzz = function(n) {
    let arr=[]
    for(let i=0;i<=n-1;i++){
        arr[i]=String(i+1)
    }
    for(let i=2;i<=n-1;i=i+3){
        arr[i]="Fizz"
    }
    for(let i=4;i<=n-1;i=i+5){
        if(arr[i]=="Fizz"){
            arr[i]="FizzBuzz"
        }else{
            arr[i]="Buzz"
        }
    }
    return arr
};
// @lc code=end

